import Common from './common.js'

class Account extends Common {
  constructor(url) {
    super()
    this.apiUrl = this.apiUrl + url
  }
  myassociation(page) {//获取自己的社团数量
    return this.http_get(this.apiUrl + '/myassociation', page)
  }
  info(id) {
    return this.http_get(this.apiUrl + '/info', { accId: id })
  }
  myactivity(page) {
    return this.http_get(this.apiUrl + '/myactivity', page)
  }
  mynotice(page) {
    return this.http_get(this.apiUrl + '/mynotice', page)
  }
  unreadnoticecount() { // 获取未读消息数量
    return this.http_get(this.apiUrl + '/unreadnoticecount')
  }
  read(id) {
    return this.http_post(this.apiUrl + '/read', { noticeId: id })
  }
  cosGetauthorizationstring(data) {
    console.log(data)
    return this.http_get(this.apiUrl + '/cos/getauthorizationstring', data)
  }
  //获取对象存储相关
  cos() {
    return this.http_get(this.apiUrl + '/cos/gettempauth', { httpMethod: 'post' })
  }
  updateaccount(body) {
    return this.http_post(this.apiUrl + '/updateaccount', body)
  }
  //设置黑名单
  setBlacklist(accountId, number) {
    console.log('39')
    console.log(this.apiUrl)
    return this.http_post(this.apiUrl + '/addBlacklist', { accountId: accountId, number: number })
  }


}
export default Account